﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using HotelSoft.HotelManagement_BUS;
using HotelSoft.HotelManagement_DTO;

namespace HotelSoft.HotelManagement_GUI
{
    public partial class frmReport_BaoCaoDoanhThuThang : Form
    {
        BaoCaoDoanhThuTheoLoaiBUS busDT;

        private int iThang, iNam;

        public int NAM
        {
            get { return iNam; }
            set { iNam = value; }
        }

        public int THANG
        {
            get { return iThang; }
            set { iThang = value; }
        }
        public frmReport_BaoCaoDoanhThuThang()
        {
            InitializeComponent();
        }

       

        private void Viewphong_Load(object sender, EventArgs e)
        {
            try
            {

                busDT = new BaoCaoDoanhThuTheoLoaiBUS();
                DataTable dt = new DataTable();
                docBaoCaoThang = new rptReport_BaoCaoThang();
                string s = Application.StartupPath + "\\rptReport_BaoCaoThang.rpt";
                docBaoCaoThang.Load(s);

                THONGKE_THANGDTO dto = new THONGKE_THANGDTO();
                dto.THANG = THANG;
                dto.NAM = NAM;
                dt = busDT.BaoCaoDoanhThuThang(dto);
                docBaoCaoThang.Database.Tables["command"].SetDataSource(dt);
                Viewphong.ReportSource = docBaoCaoThang;
            }
            catch { }
           
        }

        private void btnClose_Click_1(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
